import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPanicBuyItemMsgHelper } from "./SeqPanicBuyItemMsgHelper";
import { SPanicBuyShopForMsg } from "./SPanicBuyShopForMsg";
type int = number;
//class SPanicBuyRefreshMsg
    
    export  class SPanicBuyRefreshMsg extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPanicBuyRefreshMsg();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.type);
            SeqPanicBuyItemMsgHelper.write(arg1, this.panicBuyItems);
            this.panicBuyShop.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.type = arg1.readInt();
            this.panicBuyItems = SeqPanicBuyItemMsgHelper.read(arg1);
            this.panicBuyShop = new SPanicBuyShopForMsg();
            this.panicBuyShop.__read(arg1);
            return;
        }

        public /* const */_type: int=12031;

        public /* var */type: int;

        public /* var */panicBuyItems: Array<any>;

        public /* var */panicBuyShop: SPanicBuyShopForMsg;

        public static /* var */_regist: SPanicBuyRefreshMsg;
    }

            SPanicBuyRefreshMsg._regist = new SPanicBuyRefreshMsg(true);
        